﻿<div class="panel panel-default">
    <!--ng-controller="DicSystemAddCtrl"-->
    <div class="panel-heading font-bold">字典系统 - {{type}}</div>
    <div class="panel-body">
        <form name="form" class="bs-example form-horizontal form-validation" novalidate>
            <div class="form-group">
                <label class="col-lg-2 control-label">体系<span class="message">*</span></label>
                <div class="col-lg-10">
                    <!--<select class="form-control" ng-model="dicSystem.DimensionKey" required>
                        <option ng-repeat="set in dicSets" value="{{set.Key}}">{{set.Value}}</option>
                    </select>-->
                    <select class="form-control" ng-model="dicSystem.DimensionInfo" ng-options="x.Value for x in dicSets" required></select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">名称<span class="message">*</span></label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="字典系统名称" ng-model="dicSystem.Value" ng-blur="getInputCode()" required set-focus />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">输入码</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="输入码" ng-model="dicSystem.InputCode" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">缩写</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="字典系统缩写" ng-model="dicSystem.AbbInfo.Name" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">英文名</label>
                <div class="col-lg-10">
                    <input type="text" class="form-control" placeholder="字典系统英文名" ng-model="dicSystem.EnglishName" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">标准码<span class="message">*</span></label>
                <div class="col-lg-4">
                    <input type="text" class="form-control" placeholder="字典系统标准编码" ng-model="dicSystem.StandardCode" required />
                </div>
                <label class="col-lg-2 control-label">版本<span class="message">*</span></label>
                <div class="col-lg-4">
                    <input type="text" class="form-control" placeholder="字典系统版本" ng-model="dicSystem.Version" required />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">发布日期<span class="message">*</span></label>
                <div class="col-lg-4" ng-controller="DatepickerCtrl">
                    <div class="input-group">
                        <!--w-sm-->
                        <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dicSystem.IssueDate" is-open="opened" datepicker-options="dateOptions" ng-required="true" current-text="今天" clear-text="清除" close-text="关闭" ng-change="issueDateChange()" readonly />
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>
                <label class="col-lg-2 control-label">实施日期<span class="message">*</span></label>
                <div class="col-lg-4" ng-controller="DatepickerCtrl">
                    <div class="input-group">
                        <!--w-sm-->
                        <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dicSystem.ImpDate" is-open="opened" datepicker-options="dateOptions" ng-required="true" current-text="今天" clear-text="清除" close-text="关闭" ng-change="impDateChange()" readonly />
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                        </span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">是否推荐</label>
                <div class="col-lg-4">
                    <div class="checkbox">
                        <label class="i-checks">
                            <input type="checkbox" ng-model="dicSystem.RecommendFlag" text-transform="bool" /><i></i>
                        </label>
                    </div>
                </div>
                <label class="col-lg-2 control-label">状态</label>
                <div class="col-lg-4">
                    <select class="form-control" ng-model="dicSystem.StatusCode" required ng-disabled="type=='添加'">
                        <option value="1">创建</option>
                        <option value="2">待审核</option>
                        <option value="3">使用中</option>
                        <option value="4">作废</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">是否特殊</label>
                <div class="col-lg-4">
                    <div class="checkbox">
                        <label class="i-checks">
                            <input type="checkbox" ng-model="dicSystem.SpecialFlag" ng-change="specialFlagChange()" text-transform="bool" /><i></i>
                        </label>
                    </div>
                </div>
                <label class="col-lg-2 control-label">表名</label>
                <div class="col-lg-4">
                    <input type="text" class="form-control" placeholder="特殊字典系统表的名称" ng-model="dicSystem.SpecialTableName" ng-disabled="dicSystem.SpecialFlag!=1" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-2 control-label">备注</label>
                <div class="col-lg-10">
                    <textarea class="form-control" rows="6" placeholder="字典系统备注" ng-model="dicSystem.Description"></textarea>
                </div>
            </div>
            <div class="line line-dashed b-b line-lg"></div>
            <div class="form-group">
                <div class="col-lg-10 col-lg-offset-2">
                    <button type="submit" class="btn btn-success" ng-click="ok()" ng-disabled="form.$invalid">保存</button>
                    <button type="submit" class="btn btn-primary" ng-click="okNext()" ng-disabled="form.$invalid" ng-if="type=='添加'">保存并继续添加</button>
                    <button type="submit" class="btn btn-default" ng-click="cancel()">取消</button>
                    <span class="message">{{message}}</span>
                </div>
            </div>
        </form>
    </div>
</div>